 #coding: utf-8
from marshmallow import Schema, fields
from model.model_base import Base
from sqlalchemy import Column, String, Integer,DateTime,Numeric


class WorkrecordProOther(Base):
    # 其它类型统计
    __tablename__ = 'v_workrecord_other'
    bureauid = Column(String(2), primary_key=True, comment='供电局编号')
    bureauname = Column(String(50), nullable=True, comment='供电局名称')
    total_amount= Column(Integer, nullable=True, comment='登记总数量')
    problem_amount = Column(Integer, nullable=True, comment='其它问题数量')
    problem_percent = Column(Numeric(5,2), nullable=True, comment='其它问题占比')
    resolve_amount = Column(Integer, nullable=True, comment='其它解决方法数量')
    resolve_percent = Column(Numeric(5, 2), nullable=True, comment='其它解决方法占比')

class WorkrecordProOtherSchema(Schema):
    bureauid = fields.String()
    bureauname = fields.String()
    total_amount = fields.Integer()
    problem_amount = fields.Integer()
    problem_percent = fields.Number()
    resolve_amount = fields.Integer()
    resolve_percent = fields.Number()
workrecordProOtherSchema = WorkrecordProOtherSchema()
